]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
hotplug-sniffer: Drop "volatile" from g_once_init_enter() sentinels
authorCarlos Garnacho <carlosg@gnome.org>
Tue, 16 Mar 2021 20:44:54 +0000 (21:44 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 22 Mar 2021 11:12:23 +0000 (11:12 +0000)
As documented in g_once_init_enter(): "While @location has a volatile qualifier,
this is a historical artifact and the pointer passed to it should not be
volatile.". And effectively this now warns with modern glibc.

Drop this from our logging function.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1770>

src/hotplug-sniffer/hotplug-sniffer.c

index 7fd812ea0e53f6c098eb1a83e984aa95008ea42e..4b70ec72a014e93541c82445b501e4f8d27e25b6 100644 (file)
@@ -269,7 +269,7 @@ print_debug (const gchar *format, ...)
   g_autofree char *timestamp = NULL;
   va_list ap;
   g_autoptr (GDateTime) now = NULL;
-  static volatile gsize once_init_value = 0;
+  static size_t once_init_value = 0;
   static gboolean show_debug = FALSE;
   static guint pid = 0;